﻿using System;
using System.Web.UI;

namespace ReadyApps.Wiki
{
    /// <summary>
    /// Provides the common functionality for all components used by a wiki page.
    /// </summary>
    interface IWikiPageComponent : IEquatable<IWikiPageComponent>
    {
        /// <summary>
        /// Gets an ASP.Net control for the rendering of this component.
        /// </summary>
        /// <returns>A <see cref="Control"/> for rendering</returns>
        Control GetControl();

        /// <summary>
        /// Gets the textual markup that represents this control as it will be
        /// stored in the data source.
        /// </summary>
        /// <returns>A <see cref="String"/> representation of the component markup</returns>
        string GetMarkup();
    }
}
